package com.alinesno.cloud.base.logger.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.alibaba.fastjson.annotation.JSONField;


/**
 * <p>
 * 存储告警信息
 * </p>
 *
 * @author WeiXiaoJin
 * @since 2020-01-26 09:30:11
 */
@Entity
@Table(name="log_alert")
public class LogAlertEntity extends BaseWatcherEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 告警项目
     */
	private String domain;
    /**
     * 告警时间
     */
	@Column(name="alert_time")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date alertTime;
    /**
     * 告警分类:network/business/system/exception -alert
     */
	private String category;
    /**
     * 告警类型:error/warning
     */
	private String type;
    /**
     * 告警内容
     */
	private String content;
    /**
     * 告警指标
     */
	private String metric;
    /**
     * 数据插入时间
     */
	@Column(name="creation_date")
	@JSONField(format="yyyy-MM-dd HH:mm:ss")
	private Date creationDate;


	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public Date getAlertTime() {
		return alertTime;
	}

	public void setAlertTime(Date alertTime) {
		this.alertTime = alertTime;
	}

	public String getCategory() {
		return category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getMetric() {
		return metric;
	}

	public void setMetric(String metric) {
		this.metric = metric;
	}

	public Date getCreationDate() {
		return creationDate;
	}

	public void setCreationDate(Date creationDate) {
		this.creationDate = creationDate;
	}


	@Override
	public String toString() {
		return "LogAlertEntity{" +
			"domain=" + domain +
			", alertTime=" + alertTime +
			", category=" + category +
			", type=" + type +
			", content=" + content +
			", metric=" + metric +
			", creationDate=" + creationDate +
			"}";
	}
}
